input1=open("train data/app_100loss_8.log",'r',encoding='utf-8')
output1=open("train data/app_100loss_8_output.log",'w')

count=0
tag=0
for line in input1:
    if(line.find("Epoch")==0):
        count=0
        tag=1
        continue
    count+=1
    if(tag==1 and count==2):
        output1.writelines(line)
        tag=0
        # count=0
        continue
input1.close()
output1.close()
print("over")